/* James McTaggart (jcm28) Informatics
Multimedia Communications Technology - 17th May 2007
In making this submission I declare that my work contains no examples
of misconduct, such as plagiarism, collusion, or fabrication of results.
*/

package client;

public class Sample implements Comparable<Sample>{

	private int sampleNo;
	private String sample;
	
	public Sample(int sampleNo, String sample) {
		this.sampleNo = sampleNo;
		this.sample = sample;
	}
	
	public int compareTo(Sample arg0) {
		if(this.sampleNo<arg0.sampleNo)return -1;
		if(this.sampleNo>arg0.sampleNo)return 1;
		return 0;
	}

	@Override
	public boolean equals(Object arg0) {
		return ((Sample)arg0).sampleNo==this.sampleNo;
	}
	
	public int getSampleNo(){
		return sampleNo;
	}
	
	public String toString() {
		return sampleNo + "#" + sample;
	}
}
